package org.edu.modules.sxjy.exception;

public class MyException
        extends Exception
{
    private int number;

    public int hashCode()
    {
        int PRIME = 59;int result = 1;result = result * 59 + getNumber();return result;
    }

    public String toString()
    {
        return "MyException(number=" + getNumber() + ")";
    }

    public void setNumber(int number)
    {
        this.number = number;
    }

    public boolean equals(Object o)
    {
        if (o == this) {
            return true;
        }
        if (!(o instanceof MyException)) {
            return false;
        }
        MyException other = (MyException)o;
        if (!other.canEqual(this)) {
            return false;
        }
        return getNumber() == other.getNumber();
    }

    protected boolean canEqual(Object other)
    {
        return other instanceof MyException;
    }

    public MyException(String message)
    {
        super(message);
    }

    public MyException(String message, int number)
    {
        super(message);
        this.number = number;
    }

    public int getNumber()
    {
        return this.number;
    }
}
